﻿using System;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002F6 RID: 758
	public class TInExpr : TParseTreeNode
	{
		// Token: 0x170005F9 RID: 1529
		// (get) Token: 0x06001AA9 RID: 6825 RVA: 0x0032E39D File Offset: 0x0032C59D
		public virtual TExpressionList ExprList
		{
			get
			{
				return this.exprList;
			}
		}

		// Token: 0x170005FA RID: 1530
		// (get) Token: 0x06001AAA RID: 6826 RVA: 0x0032E3A5 File Offset: 0x0032C5A5
		public virtual TExpression Func_expr
		{
			get
			{
				return this.func_expr;
			}
		}

		// Token: 0x170005FB RID: 1531
		// (get) Token: 0x06001AAB RID: 6827 RVA: 0x0032E3AD File Offset: 0x0032C5AD
		public virtual TGroupingExpressionItemList GroupingExpressionItemList
		{
			get
			{
				return this.groupingExpressionItemList;
			}
		}

		// Token: 0x170005FC RID: 1532
		// (get) Token: 0x06001AAC RID: 6828 RVA: 0x0032E3B5 File Offset: 0x0032C5B5
		public virtual TSelectSqlStatement SubQuery
		{
			get
			{
				return this.subQuery;
			}
		}

		// Token: 0x06001AAD RID: 6829 RVA: 0x0032E3C0 File Offset: 0x0032C5C0
		public override void init(object arg1)
		{
			if (arg1 is TSelectSqlNode)
			{
				this.subQueryNode = (TSelectSqlNode)arg1;
				return;
			}
			if (arg1 is TGroupingExpressionItemList)
			{
				this.groupingExpressionItemList = (TGroupingExpressionItemList)arg1;
				return;
			}
			if (arg1 is TObjectName)
			{
				this.obj = (TObjectName)arg1;
				return;
			}
			if (arg1 is TExpression)
			{
				this.func_expr = (TExpression)arg1;
				return;
			}
			if (arg1 is TExpressionList)
			{
				this.exprList = (TExpressionList)arg1;
				return;
			}
			this.st = (TSourceToken)arg1;
		}

		// Token: 0x06001AAE RID: 6830 RVA: 0x0032E444 File Offset: 0x0032C644
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.subQueryNode != null)
			{
				if (this.subQuery == null)
				{
					this.subQuery = new TSelectSqlStatement(psql.dbvendor);
					this.subQuery.rootNode = this.subQueryNode;
				}
				this.subQuery.doParseStatement(psql);
				return;
			}
			if (this.groupingExpressionItemList != null)
			{
				this.groupingExpressionItemList.doParse(psql, plocation);
				return;
			}
			if (this.func_expr != null)
			{
				this.func_expr.doParse(psql, plocation);
				return;
			}
			if (this.exprList != null)
			{
				this.exprList.doParse(psql, plocation);
			}
		}

		// Token: 0x06001AAF RID: 6831 RVA: 0x0032E4D2 File Offset: 0x0032C6D2
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06001AB0 RID: 6832 RVA: 0x0032E4E4 File Offset: 0x0032C6E4
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.subQuery != null)
			{
				this.subQuery.accept(v);
			}
			if (this.GroupingExpressionItemList != null)
			{
				this.GroupingExpressionItemList.accept(v);
			}
			if (this.func_expr != null)
			{
				this.func_expr.accept(v);
			}
			v.postVisit(this);
		}

		// Token: 0x040019B0 RID: 6576
		private TSelectSqlNode subQueryNode;

		// Token: 0x040019B1 RID: 6577
		private TSelectSqlStatement subQuery;

		// Token: 0x040019B2 RID: 6578
		private TGroupingExpressionItemList groupingExpressionItemList;

		// Token: 0x040019B3 RID: 6579
		private TSourceToken st;

		// Token: 0x040019B4 RID: 6580
		private TObjectName obj;

		// Token: 0x040019B5 RID: 6581
		private TExpression func_expr;

		// Token: 0x040019B6 RID: 6582
		private TExpressionList exprList;
	}
}
